# -*- coding: utf-8 -*-
from enum import Enum

Month = Enum('Month', ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'))

for name, member in Month.__members__.items():
	print(name,'=>',member,',',member.value)


from enum import Enum,unique

@unique
class Weekday(Enum):
	Sun = 0 # Sun的value被设定为0
    Mon = 1
    Tue = 2
    Wed = 3
    Thu = 4
    Fri = 5
    Sat = 6

# Enum可以把一组相关常量定义在一个class中，且class不可变，而且成员可以直接比较。
